import axios from "./axios"

export default {
    // 用户登录
    userLogin: (data) => {
        return axios({
            method: "post",
            url: "user/login",
            data
        })
    },

    // 消息提示
    getMessage: (data) => {
        return axios({
            method: "get",
            url: "message/getMessage",
            data
        })
    },

    // 消息删除
    deleteMessage: (id) => {
        return axios({
            method: "delete",
            url: "message/delete/" + id,
        })
    },

    // 查看消息
    lookMessage: (id) => {
        return axios({
            method: "get",
            url: "message/lookMessage/" + id,
        })
    },

    //************************************************************* */

    // 客户信息列表
    getcustomerList: (data) => {
        return axios({
            method: "get",
            url: `clientinfo/toPage`,
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "name": data.name
            }
        })
    },

    // 获取客户姓名列表
    getNameList: () => {
        return axios({
            method: "get",
            url: `clientinfo/getNames`,
        })
    },


    // 客户信息删除
    deleteCustomer: (id) => {
        return axios({
            method: "delete",
            url: "clientinfo/delete/" + id,
        })
    },

    // 客户信息添加或修改
    addCustomer: (data) => {
        return axios({
            method: "post",
            url: "clientinfo/addOrUpdate",
            data
        })
    },

    //******************************************************** */

    // 客户办理业务列表
    getbusinessList: (data) => {
        return axios({
            method: "get",
            url: `business/toPage`,
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "type": data.type
            }
        })
    },

    // 客户办理业务删除
    deleteBusiness: (id) => {
        return axios({
            method: "delete",
            url: "business/delete/" + id,
        })
    },

    // 客户办理记录添加或修改
    addRecord: (data) => {
        return axios({
            method: "post",
            url: "business/addOrUpdate",
            data
        })
    },

}